/// data : [{"id":4,"name":"历史遗址","isShow":1,"level":2,"fatherId":1,"picture":"https://dimg02.c-ctrip.com/images/0104r120006876mxy3CE9_R_1600_10000.jpg","createTime":"2021-10-18T06:31:46.000+00:00","updateTime":"2021-10-18T08:07:38.000+00:00"},{"id":5,"name":"建筑物景区","isShow":1,"level":2,"fatherId":1,"picture":"https://dimg06.c-ctrip.com/images/0100s120008ybqbhiABFB_C_1600_1200.jpg","createTime":"2021-10-18T06:32:04.000+00:00","updateTime":"2021-10-18T08:07:39.000+00:00"}]
/// status : 200
/// msg : "ok"

class CategoryModel {
  CategoryModel({
      List<CategoryModelItem>? data,
      int? status, 
      String? msg,}){
    _data = data;
    _status = status;
    _msg = msg;
}

  CategoryModel.fromJson(dynamic json) {
    if (json['data'] != null) {
      _data = [];
      json['data'].forEach((v) {
        _data?.add(CategoryModelItem.fromJson(v));
      });
    }
    _status = json['status'];
    _msg = json['msg'];
  }
  List<CategoryModelItem>? _data;
  int? _status;
  String? _msg;

  List<CategoryModelItem>? get data => _data;
  int? get status => _status;
  String? get msg => _msg;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    if (_data != null) {
      map['data'] = _data?.map((v) => v.toJson()).toList();
    }
    map['status'] = _status;
    map['msg'] = _msg;
    return map;
  }

}

/// id : 4
/// name : "历史遗址"
/// isShow : 1
/// level : 2
/// fatherId : 1
/// picture : "https://dimg02.c-ctrip.com/images/0104r120006876mxy3CE9_R_1600_10000.jpg"
/// createTime : "2021-10-18T06:31:46.000+00:00"
/// updateTime : "2021-10-18T08:07:38.000+00:00"

class CategoryModelItem {
  CategoryModelItem({
      int? id, 
      String? name, 
      int? isShow, 
      int? level, 
      int? fatherId, 
      String? picture, 
      String? createTime, 
      String? updateTime,}){
    _id = id;
    _name = name;
    _isShow = isShow;
    _level = level;
    _fatherId = fatherId;
    _picture = picture;
    _createTime = createTime;
    _updateTime = updateTime;
}

  CategoryModelItem.fromJson(dynamic json) {
    _id = json['id'];
    _name = json['name'];
    _isShow = json['isShow'];
    _level = json['level'];
    _fatherId = json['fatherId'];
    _picture = json['picture'];
    _createTime = json['createTime'];
    _updateTime = json['updateTime'];
  }
  int? _id;
  String? _name;
  int? _isShow;
  int? _level;
  int? _fatherId;
  String? _picture;
  String? _createTime;
  String? _updateTime;

  int? get id => _id;
  String? get name => _name;
  int? get isShow => _isShow;
  int? get level => _level;
  int? get fatherId => _fatherId;
  String? get picture => _picture;
  String? get createTime => _createTime;
  String? get updateTime => _updateTime;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['id'] = _id;
    map['name'] = _name;
    map['isShow'] = _isShow;
    map['level'] = _level;
    map['fatherId'] = _fatherId;
    map['picture'] = _picture;
    map['createTime'] = _createTime;
    map['updateTime'] = _updateTime;
    return map;
  }

}